`define IMsize 4096
module IM(
        input [31:0] currentPC,
        output [31:0] instruction
    );
    reg [31:0] instr_mem[0:`IMsize-1];
    integer i=0;
    initial begin
        for(i=0;i<`IMsize;i=i+1)
            instr_mem[i]=32'd0;
        $readmemh("codetest.txt",instr_mem);
    end
    assign instruction=instr_mem[(currentPC-32'h00003000)>>2];
endmodule
